import request from '@/utils/request'

// 查询其他出库列表
export function listIssueOther(query) {
  return request({
    url: '/mes/wm/issueother/list',
    method: 'get',
    params: query
  })
}

// 查询其他出库详细
export function getIssueOther(issueId) {
  return request({
    url: '/mes/wm/issueother/' + issueId,
    method: 'get'
  })
}

// 新增其他出库
export function addIssueOther(data) {
  return request({
    url: '/mes/wm/issueother',
    method: 'post',
    data: data
  })
}

// 修改其他出库
export function updateIssueOther(data) {
  return request({
    url: '/mes/wm/issueother',
    method: 'put',
    data: data
  })
}

// 删除其他出库
export function delIssueOther(issueId) {
  return request({
    url: '/mes/wm/issueother/' + issueId,
    method: 'delete'
  })
}

//执行出库
export function execute(issueId) {
  return request({
    url: '/mes/wm/issueother/' + issueId,
    method: 'put'
  })
}

//确认
export function confirme(issueId) {
  return request({
    url: '/mes/wm/issueother/status/' + issueId,
    method: 'put'
  })
}
/* =====================20250701 其他出库 龙泉改版 其他出库支领班 以前版本不动====================*/
//其他出库支领版 确认按钮  添加预占用
export function applayconfirme(issueId) {
  return request({
    url: '/mes/wm/issueother/applayline/status/' + issueId,
    method: 'put'
  })
}
// 删除其他出库
export function removeApplay(issueId) {
  return request({
    url: '/mes/wm/issueother/removeApplay/' + issueId,
    method: 'delete'
  })
}

//执行出库 需要解除预占用
export function executeApplay(issueId) {
  return request({
    url: '/mes/wm/issueother/executeApplay/' + issueId,
    method: 'put'
  })
}
